package day05;

import java.util.Scanner;

/**
 * 说明:
 *
 * @author:SuZhongHe
 * @date:2023/2/16
 **/
public class Addition {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int score = 0;
        for (int i = 01; i <= 10; i++) {
            int num1 = (int) (Math.random() * 100);
            int num2 = (int) (Math.random() * 100);
            System.out.println("请答第" + i + "题");
            System.out.println(num1 + "+" + num2 + "=?");
            int a = scanner.nextInt();
            if (a == num1 + num2) {
                System.out.println("恭喜答对了");
                score += 10;
            } else {
                System.out.println("真遗憾答错了");
            }
        }
        System.out.println("总分为:" + score);
        System.out.println("----------------------------------");
        for (int num = 1; num <9; num++) {
            if (num==5){
                break;
            }
            System.out.println(num+"*9="+num*9);
        }
    }
}
